[Wordpress] How do you remove a Category-style (hierarchical) taxonomy metabox

Posted by Manny Fleurmond on Stack Overflow See other posts from Stack Overflow or by Manny Fleurmond
Published on 2010-12-28T17:50:07Z Indexed on 2010/12/28 17:54 UTC
Read the original article Hit count: 284

Filed under:
|
|
|
|

I was wondering if someone can help me with this. I'm currently following Shibashake's tutorial about creating custom meta-boxes that include taxonomy selection here: http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels . They show how to remove the standard metabox Wordpress automatically creates for taxonomies using the remove_meta_box function. Only problem is that the function for some reason doesn't seem to work on taxonomies that work as categories ie ones where the hierarchical option is set to true. I know I have the function working because the ones set up as tags disappear easily enough. I can't if it just isn't possible or if there is something special I need to add in one of the parameters to make it work.

Example:

$args = array( 
    'hierarchical' => false,  
    'label' =>'People',  
    'query_var' => true,  
    'rewrite' => true       
);
register_taxonomy('people', 'post',$args);

remove_meta_box('tagsdiv-people','post','side');

That works fine. If I set hierarchical to 'true, however, the meta box stays put.

Can anyone shed some light?

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about taxonomy